# -*- mode: Awk; -*-  vim: set filetype=awk : 
#
# This file is part of KNIT; copyright (C) 2010 by Tim Menzies
# tim@menzies.us.
#
# KNIT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# KNIT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with KNIT.  If not, see <http://www.gnu.org/licenses/>.

Installing KNIT

The following instructions assume a UNIX or UNIX-clone environment (e.g. LINUX,
Mac OS/X, Cygwin).

So far, these instructions have been tested on LINUX and Mac OS/X.

Step 0: Before you begin
========================

Pick a home for your KNIT code. 
In the following, I will use `myknit` to refer to that directory
and `parent` to refer to the parent of directory.
I store my KNIT code in $HOME/svns/knit  (but it can really live anywhere) so, for me,

  parent=$HOME/svns
  myknit=$HOME/svns/knit

Step1: Download 
===============

Knit Developers
---------------

If you are a member of the [http://code.google.com/p/knit/people/list  KNIT community]
then:

  cd parent
  svn checkout https://knit.googlecode.com/svn/ knit --username gname --password gpass

This will grant you read/write access to the code, as well as sharing priveldeges with the
rest of the KNIT community.

Other Developers
----------------

Otherwise, download a copy you can read/write locally (but can't update back to KNIT):

  cd parent
  svn checkout http://knit.googlecode.com/svn/ knit

Step 2: Set up envrionment
=========================

Shell
-----

In some file that runs at ogin (e.g. `.bashrc` or `.bash_profile`, add this line:

 export SVN_EDITOR=`which vi`    # or whatever your favorite editor is
 . myknit/branches/0.2/etc/dotknitrc myknit/branches/0.2

where `myknit` is the directory path down to the branch you are using. E.g. at the
time of this writing, that line for this author is:

 . ~/svns/knit/branches/0.2/etc/dotknitrc $HOME/svns/knit/branches/0.2

Somehow, arrange for this file to be executed. E.g.

  cd $HOME
  . ~/.bashrc

If this works, you should see no errors.

Emacs
-----

If you are an EMACS user, then add something like this line to `$HOME/.emacs` (making the appropriate
pathname changes):

 (load "myknit/branches/0.2/etc/dotemacs")

Step 3: Install
===============

 cd myknit/branches/0.2
 make install

If this works, you should see no errors.

Step 4: Test
============

If you are a member of the [http://code.google.com/p/knit/people/list  KNIT community],
write a little page about yourself in myknit/branches/0.2/doc/yourname.wak.

To edit that file:

1. cd to the `doc` directory;
2. Copy and modify doc/install.wak to doc/yourname.wak.
3. Add that file to site/etc/tags.txt.
3. Build and commit using `cd doc; make builds`

If that works, your page should appear at
[http://artofawk.net/?yourname].
